var entityClass = require('./Entity');

var entityCollection = {
        //系统管理(SystmManage)
        User: new entityClass('User', '用户'),    
        ExtendEnum: new entityClass('ExtendEnum', '扩展枚举'),
        Role: new entityClass('Role', '角色'),
        Menu: new entityClass('Menu', '菜单'),
        Parameter: new entityClass('Parameter', '参数设置'),
        App: new entityClass('App', '终端应用'),
        AppRole: new entityClass('AppRole', '终端角色'),
        
        //基础设置(CBO)
        Department: new entityClass('Department', '部门'),
        ItemMaster: new entityClass('ItemMaster', '料品'),
        Work: new entityClass('Work', '作业'),
        WorkLocation: new entityClass('WorkLocation', '工位'),
        Routing: new entityClass('Routing', '工艺路线'),
        Operation: new entityClass('Operation', '工序', this.Routing),
        Terminal: new entityClass('Terminal', '终端'),
        WareHouse: new entityClass('WareHouse', '仓库'),
        Container: new entityClass('Container', '容器'),
        Shift: new entityClass('Shift', '班次'),

        //初始化(Initialize)
        StationTerminal: new entityClass('StationTerminal', '工位终端交叉表'),
        StationUser: new entityClass('StationUser', '用户工位上岗记录'),
        StationWork: new entityClass('StationWork', '作业工位交叉表'),

        //生产准备(ProductReady)
        MO: new entityClass('MO', '生产订单'),

        //生产作业(ProductWork)
        KanbanDemand: new entityClass('KanbanDemand', '看板需求'),
        RcvRecord: new entityClass('RcvRecord', '入库记录'),
        DeliveryRecord: new entityClass('DeliveryRecord', '配送记录'),
        CompletePlan: new entityClass('CompletePlan', '完工计划'),

        //质检(QC)
        QCNorm: new entityClass('QCNorm', '质检指标'),
        QCRecord: new entityClass('QCRecord', '品质记录'),
        QCStandard: new entityClass('QCStandard', '检验标准'),
        BadTypeBind: new entityClass('BadTypeBind', '不良类型绑定'),

        //条码(Barcode)
        BarcodeMaster: new entityClass('BarcodeMaster', '条码主档'),
        BizRecord: new entityClass('BizRecord', '条码流水'),
        AssemblyRelation: new entityClass('AssemblyRelation', '条码装配关系'),
        ProcessException: new entityClass('ProcessException', '流水异常')
    };

exports.getEntity = function(entityName){
    return entityCollection[entityName];
};
